package com.tj.tj_java.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.tj.tj_java.pojo.Music;
import java.util.List;

@Mapper
public interface MusicMapper {

    //通过 歌名 获取 音乐
    @Select("select * from musics where musicTitle like CONCAT('%', #{musicTitle}, '%') ")
    List<Music> getMusicByTitle(String musicTitle);

    //通过 歌曲id 获取 音乐
    @Select("select * from musics where musicId = #{musicId}")
    Music getMusicById(int musicId);

    /**/
    //获取全部音乐
    @Select("select * from musics")
    List<Music> getAllMusic();
}
